package eproject.mm.com.projectsupervision.tree;

import android.os.Handler;
import android.view.View;

import me.texy.treeview.base.BaseNodeViewBinder;
import me.texy.treeview.base.BaseNodeViewFactory;


/**
 * Created by zxy on 17/4/23.
 */

public class MyNodeViewFactory extends BaseNodeViewFactory {
    Handler handler;

    public MyNodeViewFactory(Handler _handler){
        handler = _handler;
    }
    @Override
    public BaseNodeViewBinder getNodeViewBinder(View view, int level) {
        switch (level) {
            case 0:
                return new FirstLevelNodeViewBinder(view, handler);
            case 1:
                return new SecondLevelNodeViewBinder(view, handler);
            case 2:
                return new ThirdLevelNodeViewBinder(view, handler);
            default:
                return null;
        }
    }
}